package com.zhsource.system.mapper;

import com.zhsource.system.domain.Role;
import com.zhsource.system.query.RoleQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>@ClassName：RoleMapper
 * <p>@Date 2023/10/17  23:15
 *
 * @Author zzl
 **/
public interface RoleMapper {
    List<Role> list();

    Role selectById(Long id);

    void update(Role role);

    void insert(Role role);

    void delete(Long id);

    void batchDel(List<Long> ids);

    List<Role> page(RoleQuery roleQuery);

    void batchInsertRoleAndPermission(@Param("id") Long  id, @Param("permissionIds") List<Long> permissionIds);

    void batchInsertRoleAndMenu( @Param("id") Long id, @Param("menuIds") List<Long> menuIds);

    void deleteRoleAndPermissionId(Long id);

    void deleteRoleAndMenuIds(Long id);

    void deleteByRoleId(Long id);


    void batchDeleteByRoleIds(List<Long> ids);

    void batchDeleteByEmployeeIds(List<Long> ids);
}
